﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PresentationLayer.Reports;

namespace PresentationLayer.View
{
    public partial class Report_TrendAnalysisByrequisition : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            int m1 = Int32.Parse(DropDownList3.SelectedValue);
            int m2 = Int32.Parse(DropDownList4.SelectedValue);
            int m3 = Int32.Parse(DropDownList5.SelectedValue);

            string dept = DropDownList2.SelectedValue;
            string cat = DropDownList1.SelectedValue;




            DS_Requisition ds = new DS_Requisition();
            PresentationLayer.Reports.DS_RequisitionTableAdapters.RequisitionTableAdapter ta = new PresentationLayer.Reports.DS_RequisitionTableAdapters.RequisitionTableAdapter();
            ta.Fill(ds.Requisition, m1, m2, m3, dept, cat);
            Report_TrendAnalysisByRequisition req = new Report_TrendAnalysisByRequisition();
            req.SetDataSource(ds);
            CrystalReportViewer2.ReportSource = req;
        }
    }
}